<?php
/**
 *  @Copyright
 *
 *  @package     Display Searched Keywords - DSK for Joomla! 2.5
 *  @author      Viktor Vogel {@link http://www.kubik-rubik.de}
 *  @version     Version: 2.5-2 - 08-March-2012
 *  @link        Project Site {@link http://joomla-extensions.kubik-rubik.de/dsk-display-searched-keywords}
 *
 *  @license GNU/GPL
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access');

require_once(dirname(__FILE__).DS.'helper.php');

$sql = $params->get('sql', 1);
$update = $params->get('update', 0);
$rewriteseparator = $params->get('rewriteseparator', 0);
$delete = $params->get('delete', 0);
$copy = $params->get('copy', 1);
$moduleclass_sfx = $params->get('moduleclass_sfx', '');

$start = new mod_dskHelper;

// Check the database entry
if($sql == 1)
{
    $start->sql();
}

// Save keywords
$start->savekeyword($params);

// Delete all keywords
if($delete != 0)
{
    $start->deletekeywords($params);
}

// Load keywords and prepare for template file
$output = $start->loadkeywords($params);

require(JModuleHelper::getLayoutPath('mod_dsk', 'default'));
?>